home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / src / mail / pine3.96.tar.gz / pine3.96.tar / pine3.96 / build next >
Text File  |  1996-05-14  |  6KB  |  204 lines

  1. #!/bin/sh
  2. #
  3. # $Id: build,v 4.29 1996/05/14 19:22:13 hubert Exp $
  4. #
  5. #            T H E    P I N E    M A I L   S Y S T E M
  6. #
  7. #   Laurence Lundblade and Mike Seibel
  8. #   Networks and Distributed Computing
  9. #   Computing and Communications
  10. #   University of Washington
  11. #   Administration Building, AG-44
  12. #   Seattle, Washington, 98195, USA
  13. #   Internet: lgl@CAC.Washington.EDU
  14. #             mikes@CAC.Washington.EDU
  15. #
  16. #   Please address all bugs and comments to "pine-bugs@cac.washington.edu"
  17. #
  18. #
  19. #   Pine and Pico are registered trademarks of the University of Washington.
  20. #   No commercial use of these trademarks may be made without prior written
  21. #   permission of the University of Washington.
  22. #
  23. #   Pine, Pico, and Pilot software and its included text are Copyright
  24. #   1989-1996 by the University of Washington.
  25. #
  26. #   The full text of our legal notices is contained in the file called
  27. #   CPYRIGHT, included with this distribution.
  28. #
  29. #
  30. #   Pine is in part based on The Elm Mail System:
  31. #    ***********************************************************************
  32. #    *  The Elm Mail System  -  Revision: 2.13                             *
  33. #    *                                                                     *
  34. #    *             Copyright (c) 1986, 1987 Dave Taylor               *
  35. #    *             Copyright (c) 1988, 1989 USENET Community Trust    *
  36. #    ***********************************************************************
  37. #
  38.  
  39.  
  40. #
  41. #  General build script for Pine
  42. #
  43.  
  44. cat > .bld.hlp <<EOF
  45. Usage: build <make-options> <target-platform>
  46.  
  47. <target-platform> may be one of the following:
  48.     ult   Works on DECStations with Ultrix 4.1 or 4.2
  49.     nxt   Works on NeXT 68030's and 68040's running Next Mach 2.0     
  50.     sun   Works on SPARCs running SunOS 4.1
  51.     ptx   Works on Sequent Symmetry running Dynix/PTX
  52.     a32   Works on IBM RS/6000 running AIX 3.2
  53.     ...   Others are available, see doc/pine-ports
  54.   clean   Clean up object files and such.
  55.           Also, a good way to rebuild Pine/Pico from scratch.
  56.  
  57. See the document doc/pine-ports for a list of other platforms that
  58. Pine has been ported to and for details about these and other ports.
  59.  
  60. <make-options> are generally not needed. They are flags (anything
  61. beginning with -) and are passed to make. "-n" is probably the most
  62. useful, as it tells make to just print out what it is going to do and
  63. not actually do it.
  64.  
  65. To build Pine and Pico the command "build xxx" should work where xxx
  66. is one of the targets. For example "build ult" to build Pine for Ultrix.
  67.  
  68.  
  69. The executables built by this are:
  70.  
  71.  pine   The Pine mailer. Once compiled this should work just fine on
  72.         your system with no other files than this binary, and no
  73.         modifications to your system. Optionally you may create two
  74.         configuration files, /usr/local/lib/pine.conf and 
  75.         /usr/local/lib/pine.info. See the documentation for details.
  76.  
  77.  pico   The standalone editor similar to the Pine message composer.
  78.         This is a very simple straight forward text editor.
  79.  
  80.  pilot  The standalone file system navigator.
  81.  
  82.  imapd  The IMAP daemon. If you want to run Pine in client/server mode,
  83.         this is the daemon to run on the server. Installing this
  84.         requires system privileges and modifications to /etc/services.
  85.         See doc/tech-notes for more details.
  86.  
  87.  mtest  The test IMAP client, an absolutely minimal mail client, useful
  88.         for debugging.
  89.  
  90. In general you should be able to just copy the Pine and Pico binaries
  91. to the place you keep your other local binaries. /usr/local/bin is a
  92. likely place.
  93.   
  94. EOF
  95.                  
  96.  
  97. maketarget="no-target"
  98. makeargs=""
  99. PHOME=`pwd`
  100.  
  101. args=$#
  102. while [ $args -gt 0 ]
  103. do
  104.   case $1 in
  105.  
  106.     help) cat .bld.hlp
  107.           exit ;;
  108.  
  109.     -*) makeargs="$makeargs $1" ;;
  110.  
  111.     clean|???)
  112.          if [ $maketarget != no-target ]
  113.          then
  114.              echo "Can only make one target system at a time"
  115.              echo 'Both "$maketarget" and "$1" were given'
  116.              exit
  117.          else
  118.              maketarget=$1
  119.          fi
  120.        ;;
  121.  
  122.       
  123.     *) makeargs="$makeargs $1" ;;
  124.  
  125.   esac
  126.   
  127.   shift
  128.   
  129.   args=`expr $args - 1`
  130.  
  131. done
  132.  
  133. case $maketarget in
  134.    gul) makeargs="CC=gcc $makeargs" ;;
  135.    gso) makeargs="CC=gcc $makeargs" ;;
  136.    gas) makeargs="CC=gcc $makeargs" ;;
  137.    gsu) makeargs="CC=gcc $makeargs" ;;
  138.    lyn) [ -f /CYGNUS.bash ] && . /CYGNUS.bash; makeargs="CC=gcc $makeargs" ;;
  139.      *) makeargs="CC=cc $makeargs" ;;
  140. esac
  141.  
  142. echo 'make args are "'$makeargs'"'
  143.  
  144. case $maketarget in
  145.  
  146.    ???) 
  147.         echo ''
  148.         cd $PHOME
  149.         if [ -s c-client ] ; then rm -f c-client ; fi
  150.         if [ -s imapd    ] ; then rm -f imapd    ; fi
  151.         ln -s imap/systype/c-client c-client
  152.         ln -s imap/systype/imapd imapd
  153.         echo "Making c-client library, mtest and imapd"
  154.         cd $PHOME/imap
  155.         make $makeargs $maketarget
  156.         echo ''
  157.         echo "Making Pico and Pilot"
  158.         cd $PHOME/pico
  159.         make $makeargs -f makefile.$maketarget
  160.         echo ''
  161.         echo "Making Pine".
  162.         cd $PHOME/pine
  163.         make $makeargs -f makefile.$maketarget
  164.         cd $PHOME
  165.         if [ ! -d bin ] ;  then    mkdir bin;        fi
  166.         cd $PHOME/bin
  167.         rm -f pine mtest imapd pico pilot
  168.         if [ -s ../pine/pine ] ;      then ln ../pine/pine  pine      ; fi
  169.         if [ -s ../c-client/mtest ] ; then ln ../c-client/mtest mtest ; fi
  170.         if [ -s ../imapd/imapd ] ;    then ln ../imapd/imapd imapd    ; fi
  171.         if [ -s ../pico/pico ] ;      then ln ../pico/pico pico ; fi
  172.         if [ -s ../pico/pilot ] ;     then ln ../pico/pilot pilot ; fi
  173.         cd $PHOME
  174.         echo ''
  175.         echo "Links to executables are in bin directory:"
  176.         size bin/pine bin/mtest bin/imapd bin/pico bin/pilot
  177.         echo "Done"
  178.         ;;
  179.  
  180.  
  181.     clean) # This only sort of works 
  182.         echo "Cleaning c-client and imapd"
  183.     cd $PHOME/imap
  184.     make clean
  185.         echo "Cleaning Pine"
  186.         cd $PHOME/pine
  187.         make -f makefile.ult clean
  188.         echo "Cleaning pico"
  189.         cd $PHOME/pico
  190.         make $makeargs -f makefile.ult clean
  191.         echo "Done"
  192.         cd $PHOME
  193.         ;;
  194.  
  195.     no-target)
  196.         echo "No target plaform for which to build Pine given."
  197.         echo 'Give command "build help" for help.'
  198.         ;;
  199.  
  200.     *)  echo 'Do not know how to make Pine for target "'$maketarget'".'
  201.         ;;
  202. esac
  203.